﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DataAccess.Classes;
using DataAccess;

public partial class Admin_PhongTro : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            PopulateControls();
    }

    private void PopulateControls()
    {
        int howManyPages = 0;
        string page = Request.QueryString["Page"] ?? "1";
        string firstPageUrl = Link.ToAdminPhongTro();
        string pagerUrl = Link.ToAdminPhongTro("{0}");
        repProd.DataSource = PhongTro.Paging(page, out howManyPages);
        repProd.DataBind();
        pagerTop.Show(int.Parse(page), howManyPages, firstPageUrl, pagerUrl, false);
        pagerBottom.Show(int.Parse(page), howManyPages, firstPageUrl, pagerUrl, true);

    }
}
